MC-10 Operation and Language Reference Manual Chapter 4

4/USING THE MC-10 The MC-10 (or any computer for that matter) really has only four functions. It can: Allow information to be put into the computer ("input"). Process information that is currently in the computer ("processing"). Provide you with the results of the processed information ("output"). Offer the capability to store information ("memory"). Input The primary method of data input the MC-10 uses is the Keyboard. The other ways to input information are via the CASSETTE Connector from a cassette recorder or via the RS-232C Connector if you have programs that allow you to receive data. Output The main method of data output the MC-10 uses is through the TV Screen. Data output can also be via a printer (through the RS-232C channel) or a cassette recorder (through the CASSETTE Connector). As long as the power is on, the MC-10 can store over 3,000 "bytes" or characters (numbers, letters, spaces, etc.). When power is turned off, all information is erased from memory. If you want to store information permanently, use the "auxiliary memory" capabilities of a cassette recorder. How do you know how much storage space the MC-10 has at any one time? Use the MEM function which displays the amount of free memory for your programs. Turn the MC-10 off, wait 15 seconds, and turn it back on again. When the OK prompt appears, type PRINT MEM and press [ENTER]. The Screen should display 3142. That means you can enter 3,142 numbers, letters, spaces, or carriage returns before the Computer stops accepting data. If you are typing long programs, we suggest you stop every now and then and PRINT MEM to ensure you don't run out of memory. The rest of this chapter will describe how you can use the MC-10 input and output capabilities. The MC-10 Keyboard The MC-10's Keyboard has the convenience of multi-purpose keys. This includes keys that have been predefined as Micro Color BASIC keywords (commands, functions, special symbols, and Graphics Characters) so you don't have to type in the entire word when you want to use it. In this section, we will not attempt to describe the function of each Micro Color BASIC command or function. We are only describing how you can use the MC-10's features to save some time when typing in long programs. For a complete description of the Micro Color BASIC keywords, see Part II of this manual as well as the Micro Color BASIC Language Reference section in the Appendixes. For normal use, however, the MC-10 keyboard can be used like an ordinary typewriter or computer keyboard with a few minor exceptions. The [SHIFT] Key The [SHIFT] key allows you to access the alternate definitions of some keys. Alternately defined keys are those keys that have more than one symbol on the key itself. This includes punctuation (such as !, $, ") and Graphics Characters. [SHIFT] also enables you to access the Upper/Lowercase Option Mode where both uppercase and lowercase letters can be used. The Normal Operation Mode (on power-up) produces all capital letters. You can access the alternate key definitions in this mode by pressing [SHIFT] and the key. For example, the [1] key's primary definition is "!". In the same sense, the primary definition of the [A] key is "A" while the Graphics Character is its alternate definition. In the Upper/Lowercase Option Mode, you can produce the letters A-Z in reverse video to indicate the characters are lowercase. (See "Upper and Lowercase Letters" later in this chapter.) In this mode, you cannot produce Graphics Characters. Whenever you turn the Computer on, you are automatically in the "All-Capitals" (CAPS) Mode in which the keyboard will always generate the uppercase version of the letters A-Z on the TV, whether or not the [SHIFT] key is pressed. To switch to Upper/Lowercase Option Mode, press [SHIFT][0]. Then the unshifted A-Z keys will produce lowercase letters. In this mode, you must press [SHIFT] for uppercase letters. The MC-10 can only generate uppercase (capital) letters on the TV Screen. When a lowercase letter is output to the TV Screen, it is displayed as a capital letter in "reverse" video (i.e. the background is black while the letter is green). If the TV Screen won't display "real" lowercase letters, why even bother? For one thing, you may want to use the upper/lowercase mode when typing information which will be printed out on the printer. In other words, when you send lowercase letters to the printer, it will print lowercase letters if it has the capabilities. Note: Micro Color BASIC requires that all commands and functions be uppercase entries. To switch back to all-capitals, press [SHIFT][0] again. Graphics Characters are the alternate definitions found on the keys shown in Figure 15. Note that the actual Screen display will be the reverse of the keyboard symbols. When the MC-10 is in All-Caps Mode, and you press the key-combination of [SHIFT] and one of the keys which has a Graphics Character on it, the Graphics Character will be displayed on the Screen. For example, [SHIFT][A] will display the Graphics Character. (Note that you can produce similar results by sending a CHR$(137) from Micro Color BASIC. For more information on using Graphics Characters in Micro Color BASIC programs, see Chapter 15 of this manual.) Even though there are 16 possible design combinations for Graphics Characters, you can display each one of them with a different background color (there are eight background colors) for a total of 128 individual characters. To change background colors for the Graphics Characters, press the key-combination of [CONTROL][0]. You can tell what the background color will be by watching the color of the Cursor. On power-up the Cursor is black. Each time you press [CONTROL][0] the Cursor will change colors until it recycles to the original color. Note: If you specify a Graphics Character in a program line via CHR$( ), the color of the Cursor will not affect the Graphics Character. See Chapter 15 for more details. Graphics Characters generated from the keyboard can be very useful when a graphics printer or graphics pad (such as the TRS-80 Model GT-16 X-Pad) is connected to the MC-10. Other Keys with Alternate Definitions Like a traditional typewriter, all the keys with alternate definitions (such as the [1] key which has an exclamation mark above it) can produce the alternate meaning by pressing [SHIFT] and the key. In the case of the [1] key, pressing [SHIFT][1] would produce an "!". The alternate definition will always be generated when you press [SHIFT]-even if the MC-10 is in Upper/Lowercase Option Mode. The [CONTROL] Key The [CONTROL] key enables you to use Micro Color BASIC commands without having to type the entire word in. These commands can be used in the "immediate" mode or in program lines. Note that most of the keys have a Micro Color BASIC keyword printed just above the key itself. To access that keyword, press [CONTROL] and the key just below the word you wish to use. For instance, to display the command RUN, type [CONTROL][1] and RUN will appear on the Screen. The keys [Q], [A], [W], [S], and [Z] do not have keywords above them. Instead they have special instructions. [CONTROL][A] is the backspace command. When you're typing in a program line and want to erase the previous character (or move the Cursor to the left), type [CONTROL][A]. [CONTROL][Q] deletes the entire current program line you are typing and returns the Cursor to the left-hand side of the Screen. [CONTROL][W] will generate ^, the exponentiation operator. This will raise a number to the specified power. For instance, typing PRINT 10 ^ 2 [ENTER] tells the MC-10 to "square the number 10 and print the answer (100) on the screen". [CONTROL][S] -> and [CONTROL][Z] are reserved for special purposes. The MC-10 and a TV The TRS-80 MC-10 is capable of generating nine distinct colors. These are nominally defined as:
black | blue | cyan
green | red | magenta
yellow | buff | orange
However, the actual color tones produced by your TV, and the degree of difference between tones, will depend on the quality and color adjustment of your TV-not on the Computer. When you are using Micro Color BASIC, the display will normally be green with black characters although the lowercase mode inverts this by displaying green characters on a black background. Micro Color BASIC also displays a blinking "cursor" which changes colors throughout the available spectrum. Note: The following is an example of simple programming. For further examples of programs which display color as well as sound, see "Troubleshooting and Maintenance" later in this manual. For details on programming in general, see the second part of this manual, "Learning and Using Micro Color BASIC". To control the background color of the TV, type in a "command" like this: CLS code [ENTER] where code is one of the numbers which represents an available color. See Table 1.
Code | For This Color
0 | black
1 | green
2 | yellow
3 | blue
4 | red
5 | buff
6 | cyan
7 | magenta
8 | orange
Table 1
For example, type CLS 3 [ENTER] for a blue background. Whenever the Screen is cleared (by typing CLS [ENTER] or pressing RESET), the Screen will automatically revert to green no matter what color was previously displayed. To help you adjust the color and alignment of your TV, we've included two test programs in the "Troubleshooting and Maintenance" section of this manual. Sound Besides producing a variety of colors, the MC-10 and Micro Color BASIC can control the sound coming from your TV's speaker. The sound volume can be determined manually by adjusting the column control on the TV. The volume can also be adjusted "automatically" by the Micro Color BASIC SOUND statement. Use SOUND this way: SOUND pitch-code, duration [ENTER] where pitch-code may be any number from 1 to 255-1 being the lowest available pitch, 255 the highest. duration may be any number from 1 to 255; it specifies the duration of the tone in units of approximately .06 second. Most of the musical notes from E (below middle-C) to higher than the highest piano note possible may be approximated by a suitable choice of pitch-code. For example: SOUND 39,10 [ENTER] produces the musical note low-G for .6 seconds. For a demonstration of all available tones, see the test program in the "Troubleshooting and Maintenance" section of this manual. The MC-10 and a Cassette Recorder The MC-10's built-in cassette interface allows you to store data and programs with Radio Shack's optional/extra CCR-81 Computer Recorder (26-1208). While other recorders can be used, we strongly recommend you use this recorder. Connection and operation will vary with other recorders. Connect the CCR-81 to the MC-10 according to the instructions described in the section of this manual entitled "Connection to a Cassette Recorder." Also refer to the CCR-81 Owner's Manual for further instructions. Important Note! If you have a printer and a cassette recorder connected to the MC-10 at the same time, the printer must be off-line when you save information to the recorder or random data will be printed. Set the printer's ON-LINE/OFF-LINE switch to OFF-LINE or disconnect the printer from the MC-10 before saving data. Your MC-10 Computer transfers programs and data at approximately 1500 baud. This is about 190 characters per second, or 11,000 characters per minute. The most critical adjustment is the volume control on the cassette recorder. For the CCR-81 recorder, the volume control should be set between 3 and 10. The recommended setting is 5. For any other recorder, the volume level may vary. See your recorder's owner's manual for details. Saving a Program on Tape (CSAVE) Whenever you want a permanent copy (one you won't have to re-type) of a Micro Color BASIC program, simply save it on tape with the CSAVE command. We don't recommend recording over old programs. Bulk erase old tapes or use new ones. After the program has been typed into the Computer, you should: 1. Insert a blank cassette tape into the CCR-81 recorder. 2. Type: CSAVE "filename" where filename is any sequence of eight or fewer characters. 3. Press the recorder's PLAY and RECORD buttons at the same time until they lock. 4. Press [ENTER] 5. When the program has been saved, OK will appear on the TV Screen. Press the recorder's STOP button. It's a good idea to make more than one copy of a program, preferably on separate cassettes, just in case one is lost or inadvertently erased. Note: A variation of CSAVE is CSAVE* which allows you to store the contents of a numeric array for future use by CLOAD*. For more details, see Chapter 13 of this manual. Loading a Program from Tape (CLOAD) Be sure the recorder's volume control is properly adjusted before loading a program into your Computer. 1. To erase any existing program in the Computer's memory , type: NEW [ENTER] 2. Type: CLOAD "filename" where filename is any sequence of eight or fewer characters that was previously assigned to a file. 3. Press [ENTER] 4. Press the PLAY button on the recorder until it locks. The Computer will search for and load the program you have specified. While it is "searching" for the program, the letter S will appear in the upper-left corner of the TV Screen. When the Computer has found the program, the letter F and the filename will appear at the top of the Screen. If you do not specify a filename, the first program encountered will be loaded into the Computer. 5. When the program has been loaded, OK will appear on the Screen. If you type CLOAD [ENTER] when a cassette recorder is not connected to the MC-10, the Computer will "hang-up." Press the red RESET Button on the back of the Computer and the OK prompt will return. Note: A variation of CLOAD is CLOAD* which allows you to load the contents of a numeric array which was previously saved by CSAVE*. For more details, see Chapter 13 of this manual. Searching for a Program (SKIPF) If your tape contains more than one program on the same side, the Computer can search through the cassette until it finds the program you need if you use the SKIPF ("skip until you find it") command. 1. Rewind the tape. 2. Type SKIPF "filename" where filename is any sequence of eight or fewer characters. 3. Press [ENTER]. 4. Press PLAY on the recorder until it locks. 5. When the Computer has located the program, OK will appear on the Screen. If you have forgotten the filename of a particular program, use an improbable filename such as GOBBLE: SKIPF "GOBBLE" [ENTER] All program file names will appear on the Screen as they are encountered and an error message will be displayed at the end of the tape. Loading Errors There are several possible error messages that may appear in the upper-left corner of the television Screen when a mistake is made during a loading operation. You can avoid many problems with tapes by using new, high-quality Radio Shack Computer tapes (26-301) whenever you save a program or data. If it becomes necessary to re-use a tape, you should first erase the contents with a Magnetic Bulk Tape Eraser (44-210). If you try loading a blank tape, the MC-10 will search for the program until the tape ends without giving any indication the tape is blank. You will need to press the Computer's RESET button to stop the loading process. The MC-10 and a Printer Radio Shack provides a thermal printer, the TP-10 (26-1261) which is specifically designed for the MC-10. This printer provides a 32-column print out on 4" wide paper and is capable of printing all the graphics the MC-10 can produce. However, any Radio Shack serial printer or plotters can be used with the MC-10. These include the: Line Printer VII (26-1167) Line Printer VIII (26-1168) DMP-100 (26-1253) DMP-120 (26-1255) DMP-200 (26-1254) DMP-400 (26-1251) CGP-115 Plotter/Printer (26-1192) FP-215 Flatbed Plotter (26-1193) Connection to a Printer To use the MC-10 with any of these printers or plotters, you'll need to use the proper connecting cable. To connect the MC-10 to any of these optional devices, follow the instructions provided earlier in this manual. Be sure the printer or plotter is configured for serial input at 600 baud from the MC-10. For details on configuring the accessory device, see that unit's owner's manual. Important Note! If you have a printer and a cassette recorder connected to the MC-10 at the same time, the printer must be off-line when you save information to the recorder or random data will be printed. Set the printer's ON-LINE/OFF-LINE switch to OFF-LINE or disconnect the printer from the MC-10 before saving data. Micro Color BASIC has two commands associated with the printer. They are: LLIST which lists programs on the printer. LPRINT which prints program output on the printer. Important Note! If you attempt to use these commands when a printer is not connected to the MC-10, the Computer will "hang-up" and you'll have to press RESET to regain control. Listing a Program To find out how LLIST works, type in the following short program after you've connected the MC-10 to a printer. 10 REM THIS IS A TEST [ENTER] 20 REM TO TEST THE "LLIST" STATEMENT [ENTER] (Don't worry about "running" the program, the REM statements will prevent an error.) When the OK prompt is displayed, type LLIST [ENTER]. The printer should list the program. Printing Out Data LPRINT will send out data to the printer. Try this short program: 10 LPRINT "THIS IS A PRINTER TEST FOR THE MC-10" Once you've entered this, type RUN and press [ENTER]. The printer should print out: THIS IS A PRINTER TEST FOR THE MC-10.

Comments should be directed to the following email address:
dsbrain@neosplice.com